Setup

1. LINZ parcel information

a. LINZ_parcel_ID Parcel identifier - “certificate of title”.
b. LINZ_parcel_centroid_lon
c. LINZ_parcel_centroid_lat
d. LINZ_parcel_vertices_lon vector of longitudes of the vertices of the matched LINZ parcels
e. LINZ_parcel_vertices_lat
f. LINZ_parcel_roadvertices_lon subvector of longitudes of parcel that sits adjacent to a road
g. LINZ_parcel_roadvertices_lat
h. LINZ_parcel_sides_zones AUP Zone Code of adjoining parcels (this includes residential, business, and rural zones; it should also include roads, water and open spaces)
i. i. LINZ_TRNSPWR_ohead_indicator Indicator (0 or 1) for LINZ parcel located under overhead transpower line. Leave blank otherwise. Note that ‘TRANSLINE’ denotes overhead transmission lines in the GIS dataset, while ‘CABLE’ denotes underground transmission lines and can be ignored.
i. ii. LINZ_TRNSPWR_ohead_name
j. i. LINZ_VWSHFT_ohead_indicator Indicator (0 or 1) for LINZ parcel located under viewshafts. Leave blank otherwise.
j. ii. LINZ_VWSHFT_ohead_name Name of the volcanic cone (e.g. Mt Albert). Leave blank if no viewshaft applies.
j. iii. LINZ_VWSHFT_ohead_ID OBJECTID of the viewshaft. Leave blank if no viewshaft applies.

2. AUP shapefile information. Calculations are based on centroid of matched parcels:

c. Hdist_rural Minimum Haversine distance to nearest Rural Zone, plus
c. i. Hdist_rural_name Name of rural zone identified
c. ii. Hdist_rural_code Numeric code of rural zone identified

I've included all of these as rural:
['Rural - Mixed Rural Zone',
'Rural - Rural Coastal Zone',
'Rural - Countryside Living Zone',
'Rural - Rural Production Zone',
'Rural - Rural Conservation Zone',
'Rural - Waitakere Ranges Zone',
'Rural - Waitakere Foothills Zone']

d. Hdist_bus Minimum Haversine distance to nearest Business Zone
d. i. Hdist_bus_name
d. ii. Hdist_bus_code
e. Hdist_resid Minimum Haversine distance to nearest Residential Zone,
e. i. Hdist_resid_name
e. ii. Hdist_resid_code
f. Hdist_SH Minimum Haversine distance to Residential - Single House Zone
g. Hdist_MHS Minimum Haversine distance to Residential - Mixed Housing Suburban Zone
h. Hdist_MHU Minimum Haversine distance to Residential - Mixed Housing Urban Zone
i. Zone Hdist_THA Minimum Haversine distance to Residential - Terrace Housing and Apartments

Note: this is the real name for i: 'Residential - Terrace Housing and Apartment Building Zone'

a. Name (just the string is fine; I did not generate numeric codes for the local areas generated) Local_Area_name
a. Name (string) SA22018_name
b. Numeric code SA22018_code
a. Name (string) AU2013_name
b. Numeric code AU2013_code
a. Code MB2018_code
a. Code MB2013_code

For these distance calculations, use EPSG 2193 (less distortion).

a. Minimum Haversine distance to coastline Hdist_coast

There are a few different datasets that could be used for this:

- NZ Coastlines (Topo 1:50k) https://data.linz.govt.nz/layer/50258-nz-coastlines-topo-150k/
- NZ Coastline - mean high water https://data.linz.govt.nz/layer/105085-nz-coastline-mean-high-water/
- NZ Coastlines and Islands Polygons (Topo 1:50k) https://data.linz.govt.nz/layer/51153-nz-coastlines-and-islands-polygons-topo-150k/  

The first doesn't have islands (e.g. Waiheke).
The second is probably most appropriate.

b. Minimum Haversinedistance to Open Space(set of AUP Zones) Hdist_open
c. Minimum Haversine distance to motorway Hdist_motorway
d. Minimum Haversine distance to main arterial road Hdist_main_road
e. Minimum Haversine distance to rail line Hdist_rail
f. Haversine distance to downtown (use Skytower coordinates) Hdist_skytower

9. Special Housing Area (SpHAs)

Indicator (1 or 0) for consent located in SpHAs SpHA_indicator
Note: here I've used centroids. Maybe should use parcel polygons instead.

10. Ranged Address Indicator

11. Matching Type Indicators

a. LINZ_MATCH_CODE
b. LINZ_2ND_MATCH_CODE